package com.cooldatasoft.domain.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cooldatasoft.domain.dao.RolesDao;
import com.cooldatasoft.domain.model.Roles;
import com.cooldatasoft.domain.service.RolesService;


@Service("rolesService")
public class RolesServiceImpl implements RolesService {
	
	@Autowired
	private RolesDao rolesDao;

	public Long insertRoles(Roles roles) {
		return rolesDao.insert(roles);
	}

	public void updateRoles(Roles roles) {
		rolesDao.update(roles);		
	}

	public void deleteRoles(Long rolesId) {
		rolesDao.delete(rolesId);		
	}

	public List<Roles> getAllRoles() {
		return rolesDao.getAll();
	}

	@Override
	public Roles getRoleById(Long id) {
		return rolesDao.getRoleById(id);
	}
	

}
